<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	List<TbAppAuditingAreas> list = (List<TbAppAuditingAreas>)request.getAttribute("list");
	AreaMapForm form = (AreaMapForm)request.getAttribute("command");
	String areaname = StringUtils.isNotBlank(form.getAreaname())?form.getAreaname():"";
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
	String siteid = user.getSiteId();	
	
%>

<div class="userListWrap">
   <%--  <form id="userListForm">
        <div class="form-item">
    		<label for="userId">围栏:</label>
    		<input class="easyui-validatebox" type="text" name="areaname" data-options="" value="<%=areaname%>"/>
        </div> 	
        <div class="form-item form-item">
        	<label for="deptId"></label>
    		<a href="javascript:XF.Area.listAreaMapSearch()" class="input-btn-microsoft input-btn-microsoft-24">搜索</a>
        </div>
    </form> --%>

    <table id="areaMapListTable" class="easyui-datagrid"  title="" >
        <thead>
    		<tr>
    			<th data-options="field:'select',width:80,align:'center',checkbox:'ture'"><input type="checkbox" class="checkbox checkboxSelectAll"></th>    			
    		    <th data-options="field:'areaname',width:100">区域围栏</th>				
				<th data-options="field:'sitename',width:100">站点名称</th>
				<th data-options="field:'siteid',width:120">站点ID</th>				
    			<th data-options="field:'enterdate',width:200" >添加时间</th>
    			<th data-options="field:'checkdate',width:200">审核时间</th>			
    			<th data-options="field:'pro',width:150">操作</th>
    		</tr>
        </thead>
        <tbody>
        	<%
        		if(!CollectionUtils.isEmpty(list)){
        			for(TbAppAuditingAreas area:list){
        				%>
       					 <tr s="<%=area.getAreaid() %>">
       					 	<td></td>
       					 	<td><i s="<%=area.getAreaid() %>"></i><%=(null!=area.getAreaname())?area.getAreaname()+"":"" %></td>
       					 	<td><%=(null!=area.getSitename())?area.getSitename()+"":"" %></td>
       					 	<td><%=(null!=area.getSiteid())?area.getSiteid()+"":"" %></td>
       					 	<td><%=null!=area.getEnterdate()?DateFormatUtils.format(area.getEnterdate().getTime(), "yyyy-MM-dd HH:mm:ss"):"" %></td>
       					 	<td><%=null!=area.getCheckdate()?DateFormatUtils.format(area.getCheckdate().getTime(), "yyyy-MM-dd HH:mm:ss"):"" %></td>		 	
				    			<td>	
				    					<a class="inLink" href="javascript:XF.Area.checksiteMap('<%=area.getAreaid()%>')"><span>查看地图</span></a>
				    					<%if(area.getIschecked() == 0){ %>
										<a class="inLink" id="auditing" href="javascript:XF.Area.AuditedMap('<%=area.getAreaid()%>','<%=area.getAreaname() %>','<%=area.getSiteid()%>')"><span>待审核</span></a>
										<%}else if(area.getIschecked() == 1){ %>
										<span>已审核</span>
										<%} %>
										<a class="inLink" href="javascript:XF.Area.delAuditingMap('<%=area.getAreaid()%>')"><span>删除</span></a>
				    			</td>
			    		</tr>
        				<%
        			}
        		}
        	%>
    	</tbody>
    </table>
    <div class="pagination paginationFixWidth">
		<monggoTag:pagination 
		href="areaMap_search"
		pageSize="<%=form.getPageSize()%>" 
		totalRecord="<%=form.getTotalRecord() %>" 
		currentPage="<%=form.getPageNum() %>">
		</monggoTag:pagination> 
	</div>
		<!-- <div>
		<input id="selectDel" class="input-btn-microsoft" type="button" value="批量删除">
		<input id="selectCancelAudit" class="input-btn-microsoft" type="button" value="批量取消审核">
		<input id="selectAudit" class="input-btn-microsoft" type="button" value="批量审核">
		<a class="inLink" href="javascript:XF.Area.refreshAuditingMap()"><span>选择最近的更新列表</span></a>
		<input class="input-btn-microsoft" type="button" value="时间最大的待审核列表">
		</div> -->
	</div>
<script>
	$('#areaMapListTable').datagrid();
	$(document).ready(XF.Area.bigAutocomp(""));
	//XF.Notice.initList();
</script>





























